package mlz.ifdemo;

//switch的注意事项
public class SwitchDemo05 {
    public static void main(String[] args) {
        int a = 10;
        double b = 0.1;
        double b2 = 0.2;
        double c = b + b2; //0.30000000000000004
        System.out.println(c);


        switch (a){
            // a == 1
            case 1:
                System.out.println("执行内容");
                break;
        }

        System.out.println("----------------------------------------");

        //case给出的值不允许重复的,而且只能是字面量,不能是变量
        int i = 20;
        int d = 20;
    /*    switch (i){
            case 10:
                System.out.println("输出内容");
                break;
            case d:
        }
*/
    }
}
